<div class="toolbar">
	<div class="control">
		<div class="total"><strong><?php echo $self->getTotal() ?></strong> items</div>

		<div class="limiter">
			Show
			<select onchange="setLocation(this.value)" class="input-small">
			<?php foreach($self->getAvailableLimit() as $limit): ?>
				<option value="<?php echo $self->getLimitUrl($limit) ?>" <?php if($self->isLimitCurrent($limit)): ?> selected="selected"<?php endif ?> ><?php echo $limit ?></option>
			<?php endforeach ?>
			</select>
			per page
		</div>

		<div class="sort-by">
			Sort By
			<select onchange="setLocation(this.value)" class="input-small">
			<?php foreach($self->getAvailableOrders() as $key => $label): ?>
				<option <?php if ($self->isOrderCurrent($key)): ?> selected="selected"<?php endif ?> value="<?php echo $self->getOrderUrl($key) ?>">
					<?php echo $label ?>
				</option>
            <?php endforeach; ?>
			</select>
			<?php if($self->getCurrentDirection() == 'desc'): ?>
				<a href="<?php echo $self->getOrderUrl(null, 'asc') ?>"><i class="icon-arrow-down"></i></a>
			<?php else: ?>
				<a href="<?php echo $self->getOrderUrl(null, 'desc') ?>"><i class="icon-arrow-up"></i></a>
			<?php endif; ?>
		</div>
	</div>
	
	<?php if($self->isPagingVisible()): ?>
	<div class="pagination">
		<ul>
		<?php if ($self->canShowFirst()): ?>
			<li><a class="first icon-step-backward" href="<?php echo $self->getFirstPageUrl() ?>">1</a></li>
		<?php endif;?>
		
		<?php if ($self->canShowPrevious()): ?>
			<li><a class="prev icon-chevron-left" href="<?php echo $self->getPreviousPageUrl() ?>"><?php echo $self->getCurPage()-1 ?></a></li>
		<?php endif;?>

		<?php for($i = $self->getFrameStart(); $i <= $self->getFrameEnd(); $i++): ?>
			<?php if ($self->isCurrentPage($i)): ?>
				<li class="active"><span><?php echo $i ?></span></li>
			<?php else: ?>
				<li><a href="<?php echo $self->getPageUrl($i); ?>"><?php echo $i ?></a></li>
			<?php endif ?>
		<?php endfor ?>

		<?php if ($self->canShowNext()): ?>
			<li><a class="next icon-chevron-right" href="<?php echo $self->getNextPageUrl() ?>"><?php echo $self->getCurPage()+1 ?></a></li>
		<?php endif;?>
		
		<?php if ($self->canShowLast()): ?>
			<li><a class="last icon-step-forward" href="<?php echo $self->getLastPageUrl() ?>"><?php echo $self->getNumPage() ?></a></li>
		<?php endif;?>
		</ul>
	</div>
	<?php endif ?>
</div>

